{% extends "nourish/base.html" %}
{% load url from future %}

{% block content %}

<h2>Login with Facebook</h2>

<br>

{% load facebook_tags %}
{% facebook_button %}

<br />
<br />
    <h1 style="padding-left: 85px">OR</h1>
<br />

<h2>Login with a username and password</h2>
{% if form.errors %}
<p style="color: red">Your username and password didn't match. Please try again.</p>
{% endif %}

<form method="post" action="/login/">
{% csrf_token %}
<table>
<tr>
    <td>{{ form.username.label_tag }}</td>
    <td>{{ form.username }}</td>
</tr>
<tr>
    <td>{{ form.password.label_tag }}</td>
    <td>{{ form.password }}</td>
</tr>
</table>

<input type="submit" value="login" />
<input type="hidden" name="next" value="{{ next }}" />
</form>
<br />
<p>
    <a href="/reset">Forgotten Password?</a>
</p>

<br />
<br />
<br />
<br />
<br />
<br />
{% facebook_js %}
{% endblock %}
